home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-03-15 | 758 b | 32 lines | [TEXT/PRLG] |
- trial(W,H,R) :-
- Gt is 40,Gl is 5,Gb is Gt+H,Gr is Gl+W,
- draw(1,rect(Gt,Gl,Gb,Gr),_),
- 'system$random'(100,Tm),
- repeat(R),
- 'system$random'(8,ColourOrdinal),
- ColourValue is ColourOrdinal-1,
- 'system$random'(38,Pattern),
- 'system$random'(W,Width),
- 'system$random'(H,Height),
- Yl is H-Height,
- 'system$random'(Yl,Y),
- Xl is W-Width,
- 'system$random'(Xl,X),
- 'system$random'(Tm,Thickness),
- draw(6,size(Thickness,Thickness),_),
- draw(9,colour(ColourValue),_),
- draw(8,pattern(Pattern),_),
- Ri is X+Width,
- B is Y+Height,
- 'system$random'(4,ComIndex),
- member(ComIndex-Command,[1-4,2-3,3-12]),
- draw(Command,rect(X,Y,Ri,B),_),fail.
- trial(_,_,_).
-
- member(X,[X|_]).
- member(X,[_|R]) :- member(X,R).
- repeat(0) :- !,fail.
- repeat(X).
- repeat(X) :- Y is X-1,repeat(Y).
-
-